#!/bin/bash

# 清理指定端口的占用进程
for PORT in 9980 9900; do
    PID=$(lsof -i :$PORT -t)
    if [ -n "$PID" ]; then
        kill -9 $PID
        echo "已终止 $PORT 端口进程 (PID: $PID)"
    else
        echo "$PORT 端口未被占用"
    fi
done